<template>
    <div>
        <div>你好</div>
        <button @click="changeIs">changeIs</button>
        <div :is="name"></div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            name: 'com-one',
        }
    },
    methods: {
        changeIs() {
            this.name = this.name === 'com-one' ? 'com-two' : 'com-one';
        }
    }
}
</script>
<style></style>